package com.hanthink.system.domain.repair;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * @author ld 报修单
 */
public class RequestInfo {

    /**
     * 报修单id
     */
    private Long id;
    /**
     * 工厂Key
     */
    private Long siteKey;
    /**
     * 设备Key
     */
    private Long eqKey;
    /**
     * 保修单号
     */
    private String requestCode;
    /**
     * 状态
     */
    private String status;
    /**
     * 设备编码
     */
    private String equipName;
    /**
     * 设备名称
     */
    private String description;
    /**
     * 报修人
     */
    private String requestUser;
    /**
     * 报修时间
     */
    private String requestTime;
    /**
     * 审核人
     */
    private String checkUser;
    /**
     * 审核时间
     */
    private String checkTime;
    /**
     * 是否选中
     */
    private boolean checked;
    /**
     * 备注
     */
    private String remark;
    /**
     * 催促次数
     */
    private Long promptTimes;

    private String mergetype;

    public String getMergeflag() {
        return mergeflag;
    }

    public void setMergeflag(String mergeflag) {
        this.mergeflag = mergeflag;
    }

    private  String mergeflag;

    public String getDisputetime() {
        return disputetime;
    }

    public void setDisputetime(String disputetime) {
        this.disputetime = disputetime;
    }

    private String disputetime;

    private String repairUser;

    public String getRepairUser() {
        return repairUser;
    }

    public void setRepairUser(String repairUser) {
        this.repairUser = repairUser;
    }
    /**
     * 最后催促时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastPromptTime;

    private Long wechatstatus;

    public String getEnddatetime() {
        return enddatetime;
    }

    public void setEnddatetime(String enddatetime) {
        this.enddatetime = enddatetime;
    }

    public String getRushrepairtime() {
        return rushrepairtime;
    }

    public void setRushrepairtime(String rushrepairtime) {
        this.rushrepairtime = rushrepairtime;
    }

    private String rushrepairtime;
    private String enddatetime;
    //总维修时长
    private String totalmaintenancetime;

    public String getOrderreceivingtime() {
        return orderreceivingtime;
    }

    public void setOrderreceivingtime(String orderreceivingtime) {
        this.orderreceivingtime = orderreceivingtime;
    }

    private String orderreceivingtime;
    public String getTotalmaintenancetime() {
        return totalmaintenancetime;
    }

    public void setTotalmaintenancetime(String totalmaintenancetime) {
        this.totalmaintenancetime = totalmaintenancetime;
    }

    public String getConcurrentrepairtime() {
        return concurrentrepairtime;
    }

    public void setConcurrentrepairtime(String concurrentrepairtime) {
        this.concurrentrepairtime = concurrentrepairtime;
    }

    public String getSureconcurrentrepairtime() {
        return sureconcurrentrepairtime;
    }

    public void setSureconcurrentrepairtime(String sureconcurrentrepairtime) {
        this.sureconcurrentrepairtime = sureconcurrentrepairtime;
    }

    //并修时长
    private String concurrentrepairtime;

    //确认并修时长
    private String sureconcurrentrepairtime;

    private String disputesureconcurrentrepairtime;

    public String getDisputesureconcurrentrepairtime() {
        return disputesureconcurrentrepairtime;
    }

    public void setDisputesureconcurrentrepairtime(String disputesureconcurrentrepairtime) {
        this.disputesureconcurrentrepairtime = disputesureconcurrentrepairtime;
    }

    public String getDisputeperson() {
        return disputeperson;
    }

    public String getWaitingtime() {
        return waitingtime;
    }

    public void setWaitingtime(String waitingtime) {
        this.waitingtime = waitingtime;
    }

    private  String waitingtime;

    public void setDisputeperson(String disputeperson) {
        this.disputeperson = disputeperson;
    }

    public String getRemarkrq() {
        return remarkrq;
    }

    public void setRemarkrq(String remarkrq) {
        this.remarkrq = remarkrq;
    }

    public String getFaulttype() {
        return faulttype;
    }

    public void setFaulttype(String faulttype) {
        this.faulttype = faulttype;
    }

    private String disputeperson;

    private String remarkrq;

    private String faulttype;

    private String rushdisputesureconcurrentrepairtime;

    public String getRushdisputesureconcurrentrepairtime() {
        return rushdisputesureconcurrentrepairtime;
    }

    public void setRushdisputesureconcurrentrepairtime(String rushdisputesureconcurrentrepairtime) {
        this.rushdisputesureconcurrentrepairtime = rushdisputesureconcurrentrepairtime;
    }

    public String getRushdisputeperson() {
        return rushdisputeperson;
    }

    public void setRushdisputeperson(String rushdisputeperson) {
        this.rushdisputeperson = rushdisputeperson;
    }

    public String getRushdisputetime() {
        return rushdisputetime;
    }

    public void setRushdisputetime(String rushdisputetime) {
        this.rushdisputetime = rushdisputetime;
    }

    private String rushdisputeperson;

    private String rushdisputetime;
    public Long getSiteKey() {
        return siteKey;
    }

    public void setSiteKey(Long siteKey) {
        this.siteKey = siteKey;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getEqKey() {
        return eqKey;
    }

    public void setEqKey(Long eqKey) {
        this.eqKey = eqKey;
    }

    public String getRequestCode() {
        return requestCode;
    }

    public void setRequestCode(String requestCode) {
        this.requestCode = requestCode;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getEquipName() {
        return equipName;
    }

    public void setEquipName(String equipName) {
        this.equipName = equipName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getRequestUser() {
        return requestUser;
    }

    public void setRequestUser(String requestUser) {
        this.requestUser = requestUser;
    }

    public String getRequestTime() {
        return requestTime;
    }

    public void setRequestTime(String requestTime) {
        this.requestTime = requestTime;
    }

    public String getCheckUser() {
        return checkUser;
    }

    public void setCheckUser(String checkUser) {
        this.checkUser = checkUser;
    }

    public String getCheckTime() {
        return checkTime;
    }

    public void setCheckTime(String checkTime) {
        this.checkTime = checkTime;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getPromptTimes() {
        return promptTimes;
    }

    public void setPromptTimes(Long promptTimes) {
        this.promptTimes = promptTimes;
    }

    public Date getLastPromptTime() {
        return lastPromptTime;
    }

    public Long getWechatstatus() {
        return wechatstatus;
    }

    public void setWechatstatus(Long wechatstatus) {
        this.wechatstatus = wechatstatus;
    }

    public void setLastPromptTime(Date lastPromptTime) {
        this.lastPromptTime = lastPromptTime;
    }

    public String getMergetype() {
        return mergetype;
    }

    public void setMergetype(String mergetype) {
        this.mergetype = mergetype;
    }
    @Override
    public String toString() {
        return "RequestInfo{" +
                "id=" + id +
                ", siteKey=" + siteKey +
                ", eqKey=" + eqKey +
                ", requestCode='" + requestCode + '\'' +
                ", status='" + status + '\'' +
                ", equipName='" + equipName + '\'' +
                ", description='" + description + '\'' +
                ", requestUser='" + requestUser + '\'' +
                ", requestTime='" + requestTime + '\'' +
                ", checkUser='" + checkUser + '\'' +
                ", checkTime='" + checkTime + '\'' +
                ", checked=" + checked +
                ", remark='" + remark + '\'' +
                ", promptTimes=" + promptTimes +
                ", lastPromptTime=" + lastPromptTime +
                ", wechatstatus=" + wechatstatus +
                '}';
    }


    public String toStringsj1() {
        return  "【故障类型】:" + getRemarkrq() + ',' +
                "【报修单】:" + getRequestCode() + ',' +
                "【报修人】:" + getRequestUser() + ',' +
                "【报修时间】:" + getRequestTime() + ',' +
                "【报修内容】:" + getRemark() + ',' +
                "【维修人】:" + getCheckUser() + ',' +
                "【并修时长(分钟)】:" + getConcurrentrepairtime() + ',' +
                "【确认抢修时长(分钟)】:" + getRushrepairtime() + ',' +
                "【确认并修时长(分钟)】:" + getSureconcurrentrepairtime() + ',' ;
    }


    public String toStringsj2() {
        Date date = new Date();
        SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
       // System.out.println(dateFormat.format(date));
        return  "【故障类型】:" + getRemarkrq() + ',' +
                "【报修单】:" + getRequestCode() + ',' +
                "【报修人】:" + getRequestUser() + ',' +
                "【报修时间】:" + getRequestTime() + ',' +
                "【报修内容】:" + getRemark() + ',' +
                "【维修人】:" + getCheckUser() + ',' +
                "【并修时长(分钟)】:" + getConcurrentrepairtime() + ',' +
                "【确认抢修时长(分钟)】:" + getRushrepairtime() + ',' +
                "【确认并修时长(分钟)】:" + getSureconcurrentrepairtime() + ',' +
                "【更正抢修时长(分钟)】:" + getRushdisputesureconcurrentrepairtime() + ',' +
                "【更正并修时长(分钟)】:" + getDisputesureconcurrentrepairtime() + ',' +
                "【争议处理时间】:" + dateFormat.format(date) + ',' ;
    }


    public String toStringsj3() {
        Date date = new Date();
        SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        return  "【故障类型】:" + getRemarkrq() + ',' +
                "【报修单】:" + getRequestCode() + ',' +
                "【报修人】:" + getRequestUser() + ',' +
                "【报修时间】:" + getRequestTime() + ',' +
                "【报修内容】:" + getRemark() + ',' +
                "【维修人】:" + getCheckUser() + ',' +
                "【确认抢修时长(分钟)】:" + getRushrepairtime() + ',' +
                "【确认并修时长(分钟)】:" + getSureconcurrentrepairtime() + ',' +
                "【更正抢修时长(分钟)】:" + getRushdisputesureconcurrentrepairtime() + ',' +
                "【更正并修时长(分钟)】:" + getDisputesureconcurrentrepairtime() + ',' +
                "【争议处理时间】:" + dateFormat.format(date) + ',' ;
    }

    public String toStringsjtz() {
        Date date = new Date();
        SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        return  "生产部有抢修单需要审核";
    }

    public String toStringsj5() {
        Date date = new Date();
        SimpleDateFormat dateFormat= new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        return  "【故障类型】:" + getRemarkrq() + ',' +
                "【报修单】:" + getRequestCode() + ',' +
                "【报修人】:" + getRequestUser() + ',' +
                "【报修时间】:" + getRequestTime() + ',' +
                "【报修内容】:" + getRemark() + ',' +
                "【维修人】:" + getCheckUser() + ',' +
                "【并修时长(分钟)】:" + getConcurrentrepairtime() + ',' +
                "【确认抢修时长(分钟)】:" + getRushrepairtime() + ',' +
                "【确认并修时长(分钟)】:" + getSureconcurrentrepairtime() + ',' +
                "【更正抢修时长(分钟)】:" + getRushdisputesureconcurrentrepairtime() + ',' +
                "【更正并修时长(分钟)】:" + getDisputesureconcurrentrepairtime() + ',' +
                "【争议处理时间】:" + dateFormat.format(date) + ','+
                "【争议处理结果】: 已处理" ;
    }


    public String toOverTimeString(String EqKey,String EquipName,String RequestUser){
       return   "【报修编号】" + getRequestCode() + ',' +
                "【设备代码】" + EqKey + ',' +
                "【设备名称】" + EquipName + ',' +
                "【报修描述】" + getRemark() + ',' +
                "【报修人】" + RequestUser + ',' +
                "【报修时间】" + getRequestTime() + ',' ;
    }


}
